<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditProspectTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditProspectLabel_idinscrit}" for="idinscrit" />
                    <h:inputText id="idinscrit" value="#{prospectController.selected.idinscrit}" title="#{bundle.EditProspectTitle_idinscrit}" required="true" requiredMessage="#{bundle.EditProspectRequiredMessage_idinscrit}"/>
                    <h:outputLabel value="#{bundle.EditProspectLabel_nom}" for="nom" />
                    <h:inputText id="nom" value="#{prospectController.selected.nom}" title="#{bundle.EditProspectTitle_nom}" required="true" requiredMessage="#{bundle.EditProspectRequiredMessage_nom}"/>
                    <h:outputLabel value="#{bundle.EditProspectLabel_prenom}" for="prenom" />
                    <h:inputText id="prenom" value="#{prospectController.selected.prenom}" title="#{bundle.EditProspectTitle_prenom}" required="true" requiredMessage="#{bundle.EditProspectRequiredMessage_prenom}"/>
                    <h:outputLabel value="#{bundle.EditProspectLabel_login}" for="login" />
                    <h:inputText id="login" value="#{prospectController.selected.login}" title="#{bundle.EditProspectTitle_login}" required="true" requiredMessage="#{bundle.EditProspectRequiredMessage_login}"/>
                    <h:outputLabel value="#{bundle.EditProspectLabel_password}" for="password" />
                    <h:inputText id="password" value="#{prospectController.selected.password}" title="#{bundle.EditProspectTitle_password}" required="true" requiredMessage="#{bundle.EditProspectRequiredMessage_password}"/>
                    <h:outputLabel value="#{bundle.EditProspectLabel_adresseinsc}" for="adresseinsc" />
                    <h:inputText id="adresseinsc" value="#{prospectController.selected.adresseinsc}" title="#{bundle.EditProspectTitle_adresseinsc}" />
                    <h:outputLabel value="#{bundle.EditProspectLabel_tel}" for="tel" />
                    <h:inputText id="tel" value="#{prospectController.selected.tel}" title="#{bundle.EditProspectTitle_tel}" required="true" requiredMessage="#{bundle.EditProspectRequiredMessage_tel}"/>
                    <h:outputLabel value="#{bundle.EditProspectLabel_client}" for="client" />
                    <h:selectOneMenu id="client" value="#{prospectController.selected.client}" title="#{bundle.EditProspectTitle_client}" >
                        <f:selectItems value="#{clientController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditProspectLabel_inscrit}" for="inscrit" />
                    <h:selectOneMenu id="inscrit" value="#{prospectController.selected.inscrit}" title="#{bundle.EditProspectTitle_inscrit}" required="true" requiredMessage="#{bundle.EditProspectRequiredMessage_inscrit}">
                        <f:selectItems value="#{inscritController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <h:commandLink action="#{prospectController.update}" value="#{bundle.EditProspectSaveLink}"/>
                <br />
                <br />
                <h:commandLink action="View" value="#{bundle.EditProspectViewLink}" immediate="true"/>
                <br />
                <h:commandLink action="#{prospectController.prepareList}" value="#{bundle.EditProspectShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.EditProspectIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
